package com.wxzz.elearing.pay.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wxzz.elearing.pay.dto.ListWxUserActivityDto;
import com.wxzz.elearing.pay.dto.SelectAllOrderStatisticsVoByTypeDto;
import com.wxzz.elearing.pay.dto.UserOrderByCurriculumDto;
import com.wxzz.elearing.pay.dto.UserOrderDto;
import com.wxzz.elearing.pay.entity.UserOrder;
import com.wxzz.elearing.pay.vo.ActivityStatisticsVo;
import com.wxzz.elearing.pay.vo.AllOrderStatisticsTypeVo;
import com.wxzz.elearing.pay.vo.AllOrderStatisticsVo;
import com.wxzz.elearing.pay.vo.UserOrderByCurriculumVo;
import com.wxzz.elearning.common.dto.ActivityStatisticsDto;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.apache.catalina.User;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 用户订单表 服务类
 * </p>
 *
 * @author
 * @since 2021-04-23
 */
public interface IUserOrderService extends IService<UserOrder> {

    /**
     * 订单列表
     *
     * @param userOrderDto
     * @return
     */
    ReturnVO<JgPageVo<UserOrder>> listUserOrder(UserOrderDto userOrderDto);

    /**
     * 查询订单详情
     *
     * @param userOrderId
     * @return
     */
    ReturnVO<UserOrder> selectUserOrderById(Long userOrderId);

    /**
     * 查询订单状态
     *
     * @param userOrderId
     * @return
     */
    ReturnVO<UserOrder> selectPayStatus(Long userOrderId);

    /**
     * 根据课程id查询销售列表
     *
     * @return
     */
    ReturnVO<JgPageVo<List<UserOrder>>> selectUserOrderByCurriculum(UserOrderByCurriculumDto userOrderByCurriculumDto);

    /**
     * 根据课程id查询销售情况统计
     */
    ReturnVO<UserOrderByCurriculumVo> selectUserOrderByCurriculumVo(Long curriculumId);

    /**
     * 统计活动收入(远程调用)
     *
     * @param platformLivetelecastId
     * @param onlineType
     * @return
     */
    BigDecimal selectCountAmount(Long platformLivetelecastId, Integer onlineType);
//
//    /**
//     * 统计活动收入(远程调用)
//     *
//     * @return
//     */
//    BigDecimal selectCountActivityAmount(Long activity, Integer modelType);

    /**
     * 活动销售统计数据(远程调用)
     *
     * @param activityId
     * @return
     */
    List<ActivityStatisticsDto> selectActivityStatisticsDto(Long activityId);

    /**
     * 查看活动销售统计数据
     *
     * @param activityId
     * @return
     */
    ReturnVO<ActivityStatisticsVo> selectActivityStatisticsVo(Long activityId);

    /**
     * 活动销售记录
     */
    ReturnVO<JgPageVo<List<UserOrder>>> listUserOrderIdByActivity(ListWxUserActivityDto listWxUserActivityDto);

    /**
     * 概况总览(营业数据/交易数量)
     *
     * @return
     */
    ReturnVO<AllOrderStatisticsVo> selectAllOrderStatisticsVo();

    /**
     * 概况总览(营业额分类统计)
     */
    ReturnVO<AllOrderStatisticsTypeVo> selectAllOrderStatisticsVoByType(SelectAllOrderStatisticsVoByTypeDto selectAllOrderStatisticsVoByTypeDto);
}
